#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
void nixv(char* left, char* right)
{
	while (left < right)
	{
		char t = *left;
		*left = *right;
		*right = t;
		left++;
		right--;
	}
}
void zuoxuan(char* arr, int x)
{
	int len = strlen(arr);
	nixv(arr, arr + x - 1);
	nixv(arr + x, arr + len - 1);
	nixv(arr, arr + len - 1);
}
int main()
{
	int x = 0;
	char str1[] = "AABCD";
	char str2[] = "BCDAA";
	for (x = 1; x <= 5; x++)
	{
		char str1[] = "AABCD";
		zuoxuan(str1, x);
		if (strcmp(str1, str2) == 0)
		{
			printf("Yes!\n");
			break;
		}
	}
	if (x > 5)
	{
		printf("No!\n");
	}
	return 0;
}
